class Review < ActiveRecord::Base
  belongs_to :user
  belongs_to :movie
  
  
  validates_inclusion_of :score, :in=>1..5, :message=>"Score must be within 1..5"
  validates_presence_of :user, :movie
  validates_associated :user, :movie
  validates_uniqueness_of :user_id, :scope=>:movie_id
end

